<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>供应商平台</title>
</head>
<body class="tob-wrap">
	<div th:replace="common/top"></div>
	<article class="container container-c41-confirm_invoice clearfix">
		<div th:replace="common/left::c_side"></div>
		<section class="content">
			<div class="m-crumb">
				<p>
					<a href="#">订单管理 > </a> <span>验收确认/发票确认</span>
				</p>
			</div>
			<div class="m-order-info">
				<table width="100%" summay="" cellpadding="0" cellspacing="0">
					<tr>
						<td>
							<p>订单编号：<span  th:text="${purchaseOrder.salesOrderNo}"> </span></p> 
							<p>描述：<span th:text="${purchaseOrder.purchaseOrderDesc}"></span></p>
							<p>总金额：<span th:text="${purchaseOrder.currency eq 0}? '￥':'$'"/><span th:text="${#numbers.formatInteger(purchaseOrder.price,1)}"/></p>
						</td>
						<td>
							<p>时 间： <span th:if="${purchaseOrder.startTime ne null and purchaseOrder.expiredTime ne null}" th:text="${#dates.format(purchaseOrder.startTime 'yyyy-MM-dd')}+'
							 至 '+${#dates.format(purchaseOrder.expiredTime, 'yyyy-MM-dd')}">
												 </span></p>
							<p>供应商：<span th:text="${purchaseOrder.tCompany.companyName}"></span></p>
							<p>送货地址：<span th:text="${purchaseOrder.deliverAddress}"></span></p>
						</td>
						<td class="w150 txR"></td>
					</tr>
				</table>
			</div>
			<div class="m-table-sell">
				<div class="m-table-cont">
					<table width="100%" summay="" cellpadding="0" cellspacing="0">
						<thead>
							<tr>
								<th>序号</th>
								<th>描述</th>
								<th>计划金额</th>
								<th>实际金额</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						<div th:each="purchaseOrderPayment,index:${tPurchaseOrderPayment}">
							<tr class="edit-tr-wrap" th:id="'tr'+${purchaseOrderPayment.id}" th:field="*{id}">
								<input type="hidden" th:value="${purchaseOrderPayment.id}" id="paymentId" name="paymentId"/>
								<td>
									<span th:if="${#strings.length(index.count) eq 1}" th:text="${#strings.prepend(index.count,'00')}"/>
                    				<span th:if="${#strings.length(index.count) eq 2}" th:text="${#strings.prepend(index.count,'0')}"/>
                    				<span th:if="${#strings.length(index.count) eq 3}" th:text="${index.count}"/>
								</td>
								<td  th:text="${purchaseOrderPayment.orderPaymentRemark}"></td>
								<td th:text="'￥'+${purchaseOrderPayment.planAmount}"></td>
								<td  th:text="'￥'+${purchaseOrderPayment.paidAmount}"></td>
								<td><a data-trid="tr00" th:href="'javascript:editConfirm('+${purchaseOrderPayment.id}+',this)'"><i class="icon icon-tr-open"></i> 展开编辑</a></td>
							</tr>
							<tr th:id="'edtr'+${purchaseOrderPayment.id}" class="edit-tr"  style="display:none" >
								<td colspan="5">
									<table width="100%" summay="" cellpadding="0" cellspacing="0">
										<tr>
											<td colspan="3">
												<p>
													<span>付款百分比：</span>
                                            <span class="m-percent-bar">
                                                <span class="m-percent-bar-status" th:style="'width:'+${purchaseOrderPayment.percentage}+'%'"></span>
                                            </span>
                                            <span th:text="${purchaseOrderPayment.percentage}+'%'" th:field="*{percentage}"></span>
												</p>
											</td>
										</tr>
										<tr>
											<td th:if="${purchaseOrderPayment.planTime ne null}" th:text="'计划时间：'+${#dates.format(purchaseOrderPayment.planTime, 'yyyy-MM-dd')}"></td>
											<td th:if="${purchaseOrderPayment.realTime ne null}" th:text="'实际时间：'+${#dates.format(purchaseOrderPayment.realTime, 'yyyy-MM-dd')}"></td>
											<td th:text ="'计划金额：￥'+${purchaseOrderPayment.planAmount}"></td>
										</tr>
										<tr>
											<td th:text ="'实际开票金额：￥'+${purchaseOrderPayment.billedAmount}"></td>
											<td th:text ="'其中，增值税：￥'+${purchaseOrderPayment.increamentTax}"></td>
											<td th:text ="'不含税金额：￥'+${purchaseOrderPayment.amountWithoutTax}"></td>
										</tr>
										<tr>
											<td>
												<p>阶段证明：</p>
												<p class="p-indent">
													文件名A.pdf <a href="#">- 查看发货单</a>
												</p>
												<p class="p-indent">
													文件名B.pdf <a href="#">- 查看发货单</a>
												</p>
											</td>
											<td>
												<p>&nbsp;</p>
												<p class="p-indent">
													文件名A.pdf <a href="#" onclick="javascript:confirmAttachStatus('reportStatus1');">- 确认验证报告</a>
												</p>
												<p class="p-indent">
													文件名B.pdf <a href="#" onclick="javascript:confirmAttachStatus('reportStatus2');">- 确认验证报告</a>
												</p>
											</td>
											<td>
												<p>&nbsp;</p>
												<p class="p-indent">
													文件名A.pdf <a href="#" name="attachStatus1" id="attachStatus1" onclick="javascript:confirmAttachStatus('attachStatus1');">- 确认发票</a>
												</p>
												<p class="p-indent">
													文件名B.pdf <a href="#" name="attachStatus2" id="attachStatus2" onclick="javascript:confirmAttachStatus('attachStatus2');">- 确认发票</a>
												</p>
											</td>
										</tr>
										<tr>
											<td colspan="3">
												<p>
													<span class="vaT">填写备注：</span> <span th:text ="${purchaseOrder.evaluationTotalDesc}"></span>
												</p>
											</td>
										</tr>
										<tr>
											<td colspan="3">
												<p class="btn-bar">
													<a th:href="'javascript:editConfirm('+${purchaseOrderPayment.id}+',this)'" class="btn btn-simple btn-small">关闭</a>
												</p>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							</div>
						</tbody>
					</table>
				</div>
			</div>
		</section>
	</article>
</body>
<script data-main="../js/page/b3_vendor" src="../lib/requirejs/require.js"></script>
<script data-main="../js/page/b1_supplier"
	src="../lib/requirejs/require.js"></script>
	<script type="text/javascript" src="../lib/jquery/dist/jquery.js"></script>
	<script type="text/javascript" src="../js/page/b2_order.js"></script>
</html>